/*Necessary for WIN*/
#define _USE_MATH_DEFINES

#include <iostream>
#include "matrix.hpp"
#include "randomNumberGenerators.hpp"
#include "matrixdecomposition.hpp"
#include "matrixOperations.hpp"
#include "matrixChildren.hpp"
#include "polynomial.hpp"
#include "SimpleMultiDimensionGaussian.hpp"

using namespace TermStructure;
using namespace std;
double t(const Polynomial<double> &p, double x)
{
    return p[10];
}
int main(int argc, char const *argv[])
{
    SimpleMatrix<double, int> result(5,5,5);
    for(int i = 0; i < result.GetLength(0);i++)
    {
        for(int j = 0; j < result.GetLength(1); j++)
        {
            cout<<result(i,j)<<",";
        }
        cout<<endl;
    }
    Polynomial<double> pl(5);
    for(int i = 0; i <= 5; i++)
    {
        pl[i] = i+1+i*i;
    }
    std::cout<<pl(1)<<std::endl;
    std::cout<<t(pl,3)<<std::endl;
    
    double t[5][5] =
    {
        {1,1,1,1,1},
                {1,1,1,1,1},
                {1,1,1,1,1},
                {1,1,1,1,1},
                {1,1,1,1,1}
    };
    MatrixWrapper<double, 5, 5> tt(t);
    for(int i = 0; i < 5; i++)
    {
        for(int j = 0; j < 5; j++)
        {
            cout<<tt(i,j)<<" ";
        }
        cout<<endl;
    }
    return 0;
}